package a0.annotation;

import java.util.Arrays;

/**
 * author: xiaoxu
 * createTime: 2018-12-11 20:06
 **/
//@Deprecated//建议这个方法或者类不建议继续使用，标记为已过时
@MyAnnotation(age = 2,like = {"fish","shark"},color = Color.BLACK)
public class Cat {

    private String name;

    private int age;

    private Color color;

    private String[] like;

    //重写的解释说明，用于验证是否覆盖父类中的方法，【编译期】起作用
    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", color=" + color +
                ", like=" + Arrays.toString(like) +
                '}';
    }

    @Deprecated
    public String getInfo() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }


    public String[] getLike() {
        return like;
    }

    public void setLike(String[] like) {
        this.like = like;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
